/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Conexion;

/**
 *
 * @author Sebastian
 */
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
/**
 *
 * @author bd2
 */
public class Cliente {
    Socket socket ;
    //envio y recepcion de informacion
InputStream entrada;
OutputStream salida;
//los datos como tal
DataInputStream entradaDatos;
DataOutputStream salidaDatos,salidaDatos2;

    public Cliente()
    {
        try
        {socket=new Socket ("127.0.0.1", 5000);}
        
        catch(Exception Error)
        {System.out.println("Error"+Error);}
    }
    public void envioalservidor(int a, int b)
    {
        
     try
        {   
        salida=socket.getOutputStream();//canal de comunicacion q envia al cliente
        salidaDatos=new DataOutputStream (salida);//envio informacion
        salidaDatos.writeInt(a);
        salidaDatos.writeInt(b);
       
     
       
        
        
        }
        
        catch(Exception Error)
        {System.out.println("Error"+Error);}
       
    
    }


    
}

